package dao.auth.mybatis;

import java.util.List;

import model.auth.Authorities;
import model.auth.Resources;

import org.springframework.stereotype.Repository;

import dao.MyBatisBaseDao;
import dao.auth.AuthoritiesResourcesDao;

@Repository("auth.AuthoritiesResourcesDao")
public class AuthoritiesResourcesDaoImpl extends MyBatisBaseDao implements AuthoritiesResourcesDao {

	public List<Authorities> getAuthoritiesByResId(Long resid) {
		List<Authorities> auths = getSqlSessionTemplate().selectList("auth.AuthoritiesResourcesMapper.getAuthoritiesByResId", resid);
		return auths;
	}

	public List<Resources> getResourcesByAuthId(Long authid) {
		List<Resources> res = getSqlSessionTemplate().selectList("auth.AuthoritiesResourcesMapper.getResourcesByAuthId", authid);
		return res;
	}

}
